package com.bjsxt.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

public interface RoleMenuMapper {
    //添加角色菜单表的实现
    @Insert("insert into t_role_menu values(#{param1},#{param2})")
    Integer insert(Integer rid,Integer mid);

    //查询指定角色下的菜单编号mid
    @Select("SELECT rm.mid from t_role_menu rm join t_menu m on rm.mid=m.mid where rm.rid=#{param1}  and status=1")
    List<Integer> selectMore(Integer rid);

    //删除指定角色的菜单
    @Delete("delete from t_role_menu where rid=#{param1}")
    Integer delete(Integer rid);
}
